/*
 * Application.h
 *
 *  Created on: 2016年4月6日
 *      Author: terry
 */

#ifndef APPLICATION_H_
#define APPLICATION_H_

#include "BasicType.h"
#include "TSingleton.h"
#include "SharedPtr.h"
#include "TDiscreteArray.h"
#include "RtmpCaster.h"
#include "RtmpMediaCaster.h"

typedef std::shared_ptr< av::RtmpMediaCaster >		MediaCasterPtr;

typedef comn::DiscreteArray< MediaCasterPtr, MAX_CASTER >		MediaCasterArray;


class Application
{
public:
	static Application& instance();

public:
	Application();
	virtual ~Application();

	int init();

	void quit();

	int put(MediaCasterPtr& caster);

	MediaCasterPtr get(int idx);

	MediaCasterPtr remove(int idx);

private:
	MediaCasterArray	m_casters;

};

#endif /* APPLICATION_H_ */
